<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<html>
<head>
<title>编辑用户信息</title>
</head>
<body>
  <c:if test="${requestScope.object!=null}">
    <form action="modify" method="post">
      <input type="text" name="id" value="${object.id}" placeholder="ID" readonly>
      <input type="text" name="name" value="${object.name}" placeholder="名字">
      <select name="sex" title="性别">
        <option value="1">男</option>
        <option value="0"
          <c:if test="${object.sex==0}">
            <c:out value="selected" />
          </c:if>
        >女</option>
      </select>
      <input type="text" name="birthdate" value="<fmt:formatDate value='${object.birthday}' type='date' pattern='yyyy-MM-dd' />" placeholder="生日（yyyy-MM-dd）">
      <input type="text" name="telephone" value="${object.telephone}" placeholder="电话">
      <input type="text" name="email" value="${object.email}" placeholder="电邮">
      <textarea name="address" placeholder="地址">${object.address}</textarea>
      <input type="submit" value="提交更改">
    </form>
  </c:if>
</body>
</html>
